
/**
 * This Class holds a list of items in the order as well as the table number corresponding to
 * the order.
 * 
 * @author Bryan
 *
 */
import java.util.Collection;
import java.util.LinkedList;

public class Order extends Menud {

	private int tabNum;
	private int oNum;
	
	private Collection<Item> items2 = new LinkedList<Item>();
	
	Order(int tNum, int orderN){
		tabNum = tNum;
		oNum = orderN;
		
	}
	
	public int getoNum() {
		return oNum;
	}

	public void setoNum(int oNum) {
		this.oNum = oNum;
	}

	public int getTabNum() {
		return tabNum;
	}


	public void setTabNum(int tabNum) {
		this.tabNum = tabNum;
	}


	public Collection<Item> getItems() {
		return items2;
	}

	public void setItems(Collection<Item> items) {
		this.items2 = items;
	}
	
	public double addItem(String itemName){
		for(Item i: items){
			if((i.getName()).equals(itemName)){
				return i.getPrice();
			}
		}
		return 0.00;
	}
}

